import request from '@/utils/request'

// 查询抽奖配置列表
export function listLotteryAllocation(query) {
  return request({
    url: '/business/lotteryAllocation/list',
    method: 'get',
    params: query
  })
}

// 查询抽奖配置详细
export function getLotteryAllocation(id) {
  return request({
    url: '/business/lotteryAllocation/' + id,
    method: 'get'
  })
}

// 查询投入产出比
export function getInputOutputRatio() {
  return request({
    url: '/business/lotteryAllocation/inputOutputRatio',
    method: 'get'
  })
}

// 新增抽奖配置
export function addLotteryAllocation(data) {
  return request({
    url: '/business/lotteryAllocation',
    method: 'post',
    data: data
  })
}

// 修改抽奖配置
export function updateLotteryAllocation(data) {
  return request({
    url: '/business/lotteryAllocation',
    method: 'put',
    data: data
  })
}

// 删除抽奖配置
export function delLotteryAllocation(id) {
  return request({
    url: '/business/lotteryAllocation/' + id,
    method: 'delete'
  })
}
